package common;

import java.util.Comparator;

/**
 * @author cyt
 * @create 2020-10-13 16:08
 */
public class ComparableTestData implements Comparator<TestData> {

    @Override
    public int compare(TestData o1, TestData o2) {
        if (o1.getAge() > o2.getAge()) {
            return -1;
        } else if (o1.getAge() < o2.getAge()) {
            return 1;
        }
        return 0;
    }
}
